package edu.zut.cs.network;

import java.util.Random;
import java.util.Scanner;
public class Plus {
    public static void main(String[] args) {
//        随机产生两个小于100的数num1，num2
        Random ranNum = new Random();
        int num1 = ranNum.nextInt(100);
        int num2 = ranNum.nextInt(100);
        System.out.println("请计算表达式："+num1+" + "+num2+" 的值是多少");
        int sum = num1 + num2;

        Scanner input = new Scanner(System.in);
        int usersum = input.nextInt();
        if(sum == usersum){
            System.out.println("You are correct");
        }
        else{
            System.out.println("You are wrong,"+num1+" + "+num2+" should = "+sum);
        }
    }
}
